using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using DataObject.Helpers;

namespace DataObject.Model
{
	[Serializable]
	public class ServiceDTO : DTOBase
	{
        public ServiceDTO()
        {
            ServiceID = Helper.NewSeqGuid();
            ModifiedDate = DateTime.Now;
        }

		#region Reference property Members


		#endregion

		#region Collection Members

		private IList<ReservationServiceDTO> _reservationServiceCollection = new List<ReservationServiceDTO>();
		public IList<ReservationServiceDTO> ReservationServiceCollection
		{
			get
			{
				return _reservationServiceCollection;
			}
			set
			{
				if (_reservationServiceCollection != value)
				{
					_reservationServiceCollection = value;
					OnChanged();
				}
			}
		}
		private IList<RouteServiceDTO> _routeServiceCollection = new List<RouteServiceDTO>();
		public IList<RouteServiceDTO> RouteServiceCollection
		{
			get
			{
				return _routeServiceCollection;
			}
			set
			{
				if (_routeServiceCollection != value)
				{
					_routeServiceCollection = value;
					OnChanged();
				}
			}
		}
		private IList<ServiceProviderDTO> _serviceProviderCollection = new List<ServiceProviderDTO>();
		public IList<ServiceProviderDTO> ServiceProviderCollection
		{
			get
			{
				return _serviceProviderCollection;
			}
			set
			{
				if (_serviceProviderCollection != value)
				{
					_serviceProviderCollection = value;
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Active

		private bool _active;

		/// <summary>
		///  Property Active
		/// <summary>
		public bool Active
		{
			get
			{
				return _active;
			}

			set
			{
				if (_active != value)
				{
					this.OnActiveChanging(value);
					_active = value;
					this.OnActiveChanged();
					OnChanged();
				}
			}
		}

		#endregion

        #region Property NightFlag

        private bool _nightFlag;

		/// <summary>
        ///  Property NightFlag
		/// <summary>
        public bool NightFlag
		{
			get
			{
                return _nightFlag;
			}

			set
			{
                if (_nightFlag != value)
				{
                    this.OnNightFlagChanging(value);
                    _nightFlag = value;
                    this.OnNightFlagChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ChoiceOption

		private int _choiceOption;

		/// <summary>
		///  Property ChoiceOption
		/// <summary>
		public int ChoiceOption
		{
			get
			{
				return _choiceOption;
			}

			set
			{
				if (_choiceOption != value)
				{
					this.OnChoiceOptionChanging(value);
					_choiceOption = value;
					this.OnChoiceOptionChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Description

		private string _description;

		/// <summary>
		///  Property Description
		/// <summary>
		public string Description
		{
			get
			{
				return _description;
			}

			set
			{
				if (_description != value)
				{
					this.OnDescriptionChanging(value);
					_description = value;
					this.OnDescriptionChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedBy

		private string _modifiedBy;

		/// <summary>
		///  Property ModifiedBy
		/// <summary>
		public string ModifiedBy
		{
			get
			{
				return _modifiedBy;
			}

			set
			{
				if (_modifiedBy != value)
				{
					this.OnModifiedByChanging(value);
					_modifiedBy = value;
					this.OnModifiedByChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedDate

		private DateTime? _modifiedDate;

		/// <summary>
		///  Property ModifiedDate
		/// <summary>
		public DateTime? ModifiedDate
		{
			get
			{
				return _modifiedDate;
			}

			set
			{
				if (_modifiedDate != value)
				{
					this.OnModifiedDateChanging(value);
					_modifiedDate = value;
					this.OnModifiedDateChanged();
				}
			}
		}

		#endregion

		#region Property NumInPackage

		private int _numInPackage;

		/// <summary>
		///  Property NumInPackage
		/// <summary>
		public int NumInPackage
		{
			get
			{
				return _numInPackage;
			}

			set
			{
				if (_numInPackage != value)
				{
					this.OnNumInPackageChanging(value);
					_numInPackage = value;
					this.OnNumInPackageChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property OtherUom

		private string _otherUom;

		/// <summary>
		///  Property OtherUom
		/// <summary>
		public string OtherUom
		{
			get
			{
				return _otherUom;
			}

			set
			{
				if (_otherUom != value)
				{
					this.OnOtherUomChanging(value);
					_otherUom = value;
					this.OnOtherUomChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property PackageCurrency

		private int _packageCurrency;

		/// <summary>
		///  Property PackageCurrency
		/// <summary>
		public int PackageCurrency
		{
			get
			{
				return _packageCurrency;
			}

			set
			{
				if (_packageCurrency != value)
				{
					this.OnPackageCurrencyChanging(value);
					_packageCurrency = value;
					this.OnPackageCurrencyChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property PackagePrice

		private decimal _packagePrice;

		/// <summary>
		///  Property PackagePrice
		/// <summary>
		public decimal PackagePrice
		{
			get
			{
				return _packagePrice;
			}

			set
			{
				if (_packagePrice != value)
				{
					this.OnPackagePriceChanging(value);
					_packagePrice = value;
					this.OnPackagePriceChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ServiceCode

		private string _serviceCode;

		/// <summary>
		///  Property ServiceCode
		/// <summary>
		public string ServiceCode
		{
			get
			{
				return _serviceCode;
			}

			set
			{
				if (_serviceCode != value)
				{
					this.OnServiceCodeChanging(value);
					_serviceCode = value;
					this.OnServiceCodeChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ServiceID

		private Guid _serviceID;

		/// <summary>
		///  Property ServiceID
		/// <summary>
		public Guid ServiceID
		{
			get
			{
				return _serviceID;
			}

			set
			{
				if (_serviceID != value)
				{
					this.OnServiceIDChanging(value);
					_serviceID = value;
					this.OnServiceIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ServiceName

		private string _serviceName;

		/// <summary>
		///  Property ServiceName
		/// <summary>
		public string ServiceName
		{
			get
			{
				return _serviceName;
			}

			set
			{
				if (_serviceName != value)
				{
					this.OnServiceNameChanging(value);
					_serviceName = value;
					this.OnServiceNameChanged();
					OnChanged();
				}
			}
		}

		#endregion

        #region Property Unit

        private int _unit;

        /// <summary>
        ///  Property Unit
        /// <summary>
        public int Unit
        {
            get
            {
                return _unit;
            }

            set
            {
                if (_unit != value)
                {
                    this.OnUnitChanging(value);
                    _unit = value;
                    this.OnUnitChanged();
                    OnChanged();
                }
            }
        }

        #endregion

		#region Property Currency

		private int _currency;

		/// <summary>
        ///  Property Currency
		/// <summary>
        public int Currency
		{
			get
			{
                return _currency;
			}

			set
			{
                if (_currency != value)
				{
					this.OnCurrencyChanging(value);
                    _currency = value;
					this.OnCurrencyChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property UnitPrice

		private decimal _unitPrice;

		/// <summary>
		///  Property UnitPrice
		/// <summary>
		public decimal UnitPrice
		{
			get
			{
				return _unitPrice;
			}

			set
			{
				if (_unitPrice != value)
				{
					this.OnUnitPriceChanging(value);
					_unitPrice = value;
					this.OnUnitPriceChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Extensibility Method Declarations

		protected virtual void OnActiveChanging(bool active) { }
		protected virtual void OnActiveChanged() { }
        protected virtual void OnNightFlagChanging(bool nightFlag) { }
        protected virtual void OnNightFlagChanged() { }
		protected virtual void OnChoiceOptionChanging(int choiceOption) { }
		protected virtual void OnChoiceOptionChanged() { }
		protected virtual void OnDescriptionChanging(string description) { }
		protected virtual void OnDescriptionChanged() { }
		protected virtual void OnModifiedByChanging(string modifiedBy) { }
		protected virtual void OnModifiedByChanged() { }
		protected virtual void OnModifiedDateChanging(DateTime? modifiedDate) { }
		protected virtual void OnModifiedDateChanged() { }
		protected virtual void OnNumInPackageChanging(int numInPackage) { }
		protected virtual void OnNumInPackageChanged() { }
		protected virtual void OnOtherUomChanging(string otherUom) { }
		protected virtual void OnOtherUomChanged() { }
		protected virtual void OnPackageCurrencyChanging(int packageCurrency) { }
		protected virtual void OnPackageCurrencyChanged() { }
		protected virtual void OnPackagePriceChanging(decimal packagePrice) { }
		protected virtual void OnPackagePriceChanged() { }
		protected virtual void OnServiceCodeChanging(string serviceCode) { }
		protected virtual void OnServiceCodeChanged() { }
		protected virtual void OnServiceIDChanging(Guid serviceID) { }
		protected virtual void OnServiceIDChanged() { }
		protected virtual void OnServiceNameChanging(string serviceName) { }
		protected virtual void OnServiceNameChanged() { }
        protected virtual void OnUnitChanging(int unit) { }
        protected virtual void OnUnitChanged() { }
        protected virtual void OnCurrencyChanging(int currency) { }
        protected virtual void OnCurrencyChanged() { }
        protected virtual void OnUnitPriceChanging(decimal unitPrice) { }
		protected virtual void OnUnitPriceChanged() { }

		#endregion

	}
}
